Class NotificationParams
- java.lang.Object
-
- com.amazon.A3L.messaging.ADM.notification.NotificationParams
-
public class NotificationParams extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NotificationParams(android.os.Bundle bundle)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description android.os.BundlebundleWithNotificationParametersRemoved()booleangetBoolean(java.lang.String key)Parses boolean value of corresponding keyjava.lang.IntegergetInteger(java.lang.String key)Parses the integer value of corresponding keyorg.json.JSONArraygetJSONArray(java.lang.String key)java.lang.String[]getLocalizationArgs(java.lang.String field)Method to fetch Localization Arguments for title and bodyjava.lang.Object[]getLocalizationArgsForKey(java.lang.String key)Returns loc_arg used for localization of title and bodyjava.lang.StringgetLocalizationResourceForKey(java.lang.String key)java.lang.StringgetLocalizedString(android.content.res.Resources resources, java.lang.String packageName, java.lang.String key)Tries to get localized String from the app resources, if not present returns nulljava.lang.LonggetLong(java.lang.String key)parses the long value for corresponding keyjava.lang.IntegergetNotificationCount()java.lang.IntegergetNotificationPriority()java.lang.StringgetPossibleLocalizedString(android.content.res.Resources resources, java.lang.String packageName, java.lang.String key)Checks if original string(unlocalized) present then returns it, otherwise tries to get localized string for corresponding keyjava.lang.StringgetString(java.lang.String key)Parses the value for the given key in the bundlejava.lang.IntegergetVisibility()static booleanisNotification(android.os.Bundle bundle)Checks if the current bundle contains keys related to Notification
-
-
-
Method Detail
-
isNotification
public static boolean isNotification(android.os.Bundle bundle)
Checks if the current bundle contains keys related to Notification- Parameters:
bundle-- Returns:
-
getString
public java.lang.String getString(java.lang.String key)
Parses the value for the given key in the bundle- Parameters:
key-- Returns:
-
getPossibleLocalizedString
public java.lang.String getPossibleLocalizedString(android.content.res.Resources resources, java.lang.String packageName, java.lang.String key)Checks if original string(unlocalized) present then returns it, otherwise tries to get localized string for corresponding key- Parameters:
resources-packageName-key-- Returns:
- String
-
getLocalizedString
public java.lang.String getLocalizedString(android.content.res.Resources resources, java.lang.String packageName, java.lang.String key)Tries to get localized String from the app resources, if not present returns null- Parameters:
resources-packageName-key-- Returns:
- localizedString
-
getLocalizationResourceForKey
public java.lang.String getLocalizationResourceForKey(java.lang.String key)
-
getLocalizationArgsForKey
public java.lang.Object[] getLocalizationArgsForKey(java.lang.String key)
Returns loc_arg used for localization of title and body- Parameters:
key-- Returns:
- array of String
-
getJSONArray
public org.json.JSONArray getJSONArray(java.lang.String key)
- Parameters:
key-- Returns:
- JSONArray for corresponding key
-
bundleWithNotificationParametersRemoved
public android.os.Bundle bundleWithNotificationParametersRemoved()
- Returns:
- bundle with all the notification keys removed.
-
getLong
public java.lang.Long getLong(java.lang.String key)
parses the long value for corresponding key- Parameters:
key-- Returns:
- a long
-
getBoolean
public boolean getBoolean(java.lang.String key)
Parses boolean value of corresponding key- Parameters:
key-- Returns:
- boolean
-
getNotificationPriority
public java.lang.Integer getNotificationPriority()
-
getInteger
public java.lang.Integer getInteger(java.lang.String key)
Parses the integer value of corresponding key- Parameters:
key-- Returns:
- integer
-
getVisibility
public java.lang.Integer getVisibility()
-
getNotificationCount
public java.lang.Integer getNotificationCount()
-
getLocalizationArgs
public java.lang.String[] getLocalizationArgs(java.lang.String field)
Method to fetch Localization Arguments for title and body- Parameters:
field-- Returns:
-
-